Skip to content

Add EnableDescriptionMarkdown to WithCustomInput example#393

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-custom-input-markdown
Draft

Add EnableDescriptionMarkdown to WithCustomInput example#393
Copilot wants to merge 3 commits intomainfrom
copilot/fix-custom-input-markdown

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Fix WithCustomInput example missing EnableDescriptionMarkdown

  • Update the WithCustomInput example in external-parameters.mdx to include EnableDescriptionMarkdown = true
  • Add explanation about when to use EnableDescriptionMarkdown
  • Build the documentation to verify the changes
  • Review the final changes
  • Run code review - no issues found
  • Run security checks - no issues found
  • Address feedback: Change to copy EnableDescriptionMarkdown from parameter instead of hardcoding

Summary of Changes

This PR fixes the documentation for WithCustomInput to properly demonstrate markdown rendering in parameter dialogs.

What was wrong:

  • The example showed WithDescription(enableMarkdown: true) but didn't set EnableDescriptionMarkdown on the InteractionInput object
  • This caused markdown to render as plain text in the parameter dialog
  • Users were confused because enableMarkdown: true only sets the property on the ParameterResource, but WithCustomInput creates a new InteractionInput object

What was fixed:

  1. Changed to copy EnableDescriptionMarkdown = p.EnableDescriptionMarkdown from the parameter (line 154)
  2. Updated documentation to explain that WithDescription(enableMarkdown: true) sets the property on the parameter resource
  3. Clarified that when using WithCustomInput, you must explicitly copy this property to your custom InteractionInput object
  4. This approach is less redundant and clearer than hardcoding true

How it works:

  • WithDescription(enableMarkdown: true) sets EnableDescriptionMarkdown on the ParameterResource
  • When NOT using WithCustomInput, the framework automatically copies this to the InteractionInput
  • When using WithCustomInput, you create your own InteractionInput, so you must copy: EnableDescriptionMarkdown = p.EnableDescriptionMarkdown

Testing:

  • ✅ Documentation builds successfully without errors (273.47s, 4337 pages)
  • ✅ Code review passed with no issues
  • ✅ Security check passed (no analyzable code changes)
Original prompt

This section details on the original issue you should resolve

<issue_title>WithCustomInput example missing EnableDescriptionMarkdown for markdown rendering</issue_title>
<issue_description>### Type of issue

Missing information

Description

The external-parameters docs show how to use WithDescription("...", enableMarkdown: true) alongside WithCustomInput for parameter prompts. However, the example code sets Description = p.Description in the WithCustomInput callback without also setting EnableDescriptionMarkdown = true on the InteractionInput object.

This means the markdown description renders as plain text in the parameter dialog — the enableMarkdown: true flag from WithDescription does not propagate through to the custom input's Description property.

Current example (doesn't render markdown in dialog)

var externalServiceUrl = builder.AddParameter("external-service-url")
    .WithDescription("The URL of the external service.")
    .WithCustomInput(p => new()
    {
        InputType = InputType.Text,
        Value = "https://example.com",
        Name = p.Name,
        Placeholder = $"Enter value for {p.Name}",
        Description = p.Description
    });

Fix — add EnableDescriptionMarkdown

var externalServiceUrl = builder.AddParameter("external-service-url")
    .WithDescription("The URL of the external service.", enableMarkdown: true)
    .WithCustomInput(p => new()
    {
        InputType = InputType.Text,
        Value = "https://example.com",
        Name = p.Name,
        Placeholder = $"Enter value for {p.Name}",
        Description = p.Description,
        EnableDescriptionMarkdown = true  // <-- needed for markdown to render
    });

Without EnableDescriptionMarkdown = true on the InteractionInput, any markdown in the description (like links) renders as raw text in the "Set parameter value" dialog.

This was discovered while trying to add a clickable link to a parameter description — it took several attempts to figure out that WithDescription(enableMarkdown: true) only affects the resource list view, not the custom input dialog.

Page URL

https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/external-parameters#prompt-for-parameter-values-in-the-dashboard

Content source URL

https://github.com/microsoft/aspire.dev/blob/main/docs/fundamentals/external-parameters.md</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing EnableDescriptionMarkdown in WithCustomInput example Add EnableDescriptionMarkdown to WithCustomInput example Feb 10, 2026
@maddymontaquila
Copy link
Contributor

do we need both .WithDescription(enableMarkdown: true) AND EnableDescriptionMarkdown=true? seems redundant? @copilot can you check that out in aspire's source

…m parameter

Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 10, 2026

do we need both .WithDescription(enableMarkdown: true) AND EnableDescriptionMarkdown=true? seems redundant? @copilot can you check that out in aspire's source

Good catch! I investigated the Aspire source code and you're right that it seems redundant at first glance, but both ARE needed due to how WithCustomInput works.

Here's what happens:

  • .WithDescription(enableMarkdown: true) sets EnableDescriptionMarkdown on the ParameterResource itself
  • When you DON'T use WithCustomInput, the framework automatically copies this property to the generated InteractionInput
  • When you DO use WithCustomInput, you're creating your own InteractionInput object that replaces the default generation, so you must manually copy the property

I've updated the example to use EnableDescriptionMarkdown = p.EnableDescriptionMarkdown instead of hardcoding true, which makes it clearer that the property flows from the parameter. This way if you want markdown enabled, you just set it once in WithDescription(enableMarkdown: true) and then copy it in the custom input.

See commit 78e603e for the improved example.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/CommunityToolkit/Aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/CommunityToolkit/Aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (http block)
  • https://api.github.com/repos/dotnet/aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (http block)
  • https://api.github.com/repos/dotnet/aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (http block)
  • https://api.github.com/repos/microsoft/aspire.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/aspire.dev/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (http block)
  • https://api.github.com/repos/microsoft/dcp
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/dcp/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (http block)
  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (dns block)
  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build -collect-logs log �� %aE ���� --follow s/.bin/git ands/aspire-mcp.git --follow ire.dev/src/fron--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/config-file/usr/bin/python3 --follow /home/REDACTED/worbin/WALinuxAgent-2.15.0.1-py3.12.egg git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WithCustomInput example missing EnableDescriptionMarkdown for markdown rendering

2 participants